home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
crack200
/
frmselec.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1999-09-05
|
3KB
|
92 lines
VERSION 5.00
Begin VB.Form frmSelect
Caption = "Select Window To Crack"
ClientHeight = 3705
ClientLeft = 5130
ClientTop = 2415
ClientWidth = 5910
Icon = "frmSelect.frx":0000
LinkTopic = "Form1"
ScaleHeight = 3705
ScaleWidth = 5910
Begin VB.CommandButton cmdClose
Cancel = -1 'True
Caption = "&Close"
Height = 375
Left = 2520
TabIndex = 3
Top = 3240
Width = 1095
End
Begin VB.CommandButton cmdSwitch
Caption = "Crack"
Height = 375
Left = 1320
TabIndex = 2
ToolTipText = "Switch to the Selected Task"
Top = 3240
Width = 1095
End
Begin VB.CommandButton cmdRefresh
Caption = "&Refresh"
Default = -1 'True
Height = 375
Left = 120
TabIndex = 1
ToolTipText = "Refresh the Task List"
Top = 3240
Width = 1095
End
Begin VB.ListBox lstTasks
Height = 3015
IntegralHeight = 0 'False
Left = 120
Sorted = -1 'True
TabIndex = 0
Top = 120
Width = 5655
End
Attribute VB_Name = "frmSelect"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub cmdClose_Click()
frmSelect.Visible = False
End Sub
Private Sub cmdSwitch_Click()
With lstTasks
If .ListCount = 0 Then Exit Sub
End With
frmMain.txtName.Text = lstTasks
frmSelect.Visible = False
SetNewCaption lstTasks, lstTasks + " - Microsoft Internet Explorer"
End Sub
Private Sub cmdRefresh_Click()
Call pGetTasks
End Sub
Private Sub Form_Load()
If App.PrevInstance Then Unload Me
Call pGetTasks
End Sub
Private Sub Form_Resize()
On Error Resume Next
With lstTasks
.Move .Left, .Top, Me.ScaleWidth - .Left * 2, Me.ScaleHeight - .Top - cmdRefresh.Height - (2 * Screen.TwipsPerPixelY)
cmdRefresh.Top = .Height + .Top + (2 * Screen.TwipsPerPixelY)
cmdSwitch.Top = cmdRefresh.Top
cmdClose.Top = cmdRefresh.Top
End With
End Sub
Private Sub pGetTasks()
Call fEnumWindows(lstTasks)
On Error Resume Next
lstTasks.ListIndex = 0
End Sub
Sub SetNewCaption(lpWindow, lpnewcaption As String)
Dim fx, fx2
fx = FindWindow(vbNullString, lpWindow)
fx2 = sendmessagebystring(fx, WM_SETTEXT, 0, lpnewcaption)
End Sub